#ifndef VXDOCKSELECTOR_H
#define VXDOCKSELECTOR_H

#include <Qt>
#include <QtGui>
#include "vxdockcontainer.h"

class VxDockSelector : public QWidget
{

	Q_OBJECT

public:


	enum Size{
		HEIGHT = 12,
		WIDTH = 35
	};

	VxDockSelector(QWidget * parent, Qt::DockWidgetArea orientation, VxDockContainer * container);

	bool eventFilter(QObject * object, QEvent * event);

	void hide();

private:
	QRect _activeBorder;
	Qt::DockWidgetArea _orientation;
	VxDockContainer * _container;


	QPropertyAnimation * _showAnimation;

	void _adjustPosition(QPoint * pointFrom, QPoint * pointTo, QPoint * mousep=NULL);

	QRect _getActiveBorder();
	Qt::DockWidgetArea _inActive(QPoint point);
	void _showButton(QPoint mousep, bool animation=true);
	void _hideButton(bool anim=true);


private slots:
	void _mouseReleasedIdle(QPoint);
	void _mouseReleasedMove(QPoint);
	void _showDockContainer();

};

#endif // VXDOCKSELECTOR_H
